﻿Shader "CustomRenderTexture/Simple"
{
	Properties
	{
		_Color1("Color1", Color) = (1,1,1,1)
		_Color2("Color2", Color) = (1,1,1,1)
		_Tex("InputTex", 2D) = "white" {}
	}

	SubShader
	{
		Lighting Off
		Blend One Zero

		Pass
		{
			CGPROGRAM
			#include "UnityCustomRenderTexture.cginc"
			#pragma vertex CustomRenderTextureVertexShader
			#pragma fragment frag
			#pragma target 3.0

			float4 _Color1;
			float4 _Color2;
			sampler2D _Tex;
			float4 frag(v2f_customrendertexture v2f) : COLOR
			{
				float4 finalColor = lerp(_Color1, _Color2, frac(_Time.y));
				return finalColor * tex2D(_Tex, v2f.localTexcoord.xy);
			}
			ENDCG
		}
	}
}